Optimal. Leaf size=47 \[ \frac{10 \tan ^{-1}\left (\frac{\sin (c+d x)}{-\cos (c+d x)+\sqrt{3}+2}\right )}{\sqrt{3} d}+\frac{5 x}{\sqrt{3}}-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0670049, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2735, 2657} \[ \frac{10 \tan ^{-1}\left (\frac{\sin (c+d x)}{-\cos (c+d x)+\sqrt{3}+2}\right )}{\sqrt{3} d}+\frac{5 x}{\sqrt{3}}-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2657
Rubi steps
\begin{align*} \int \frac{3+\cos (c+d x)}{2-\cos (c+d x)} \, dx &=-x+5 \int \frac{1}{2-\cos (c+d x)} \, dx\\ &=-x+\frac{5 x}{\sqrt{3}}+\frac{10 \tan ^{-1}\left (\frac{\sin (c+d x)}{2+\sqrt{3}-\cos (c+d x)}\right )}{\sqrt{3} d}\\ \end{align*}
Mathematica [A] time = 0.0538518, size = 31, normalized size = 0.66 \[ \frac{10 \tan ^{-1}\left (\sqrt{3} \tan \left (\frac{1}{2} (c+d x)\right )\right )}{\sqrt{3} d}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.093, size = 39, normalized size = 0.8 \begin{align*} -2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d}}+{\frac{10\,\sqrt{3}}{3\,d}\arctan \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \sqrt{3} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.57573, size = 70, normalized size = 1.49 \begin{align*} \frac{2 \,{\left (5 \, \sqrt{3} \arctan \left (\frac{\sqrt{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right ) - 3 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )\right )}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.39132, size = 119, normalized size = 2.53 \begin{align*} -\frac{3 \, d x + 5 \, \sqrt{3} \arctan \left (\frac{2 \, \sqrt{3} \cos \left (d x + c\right ) - \sqrt{3}}{3 \, \sin \left (d x + c\right )}\right )}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 7.03786, size = 56, normalized size = 1.19 \begin{align*} \begin{cases} - x + \frac{10 \sqrt{3} \left (\operatorname{atan}{\left (\sqrt{3} \tan{\left (\frac{c}{2} + \frac{d x}{2} \right )} \right )} + \pi \left \lfloor{\frac{\frac{c}{2} + \frac{d x}{2} - \frac{\pi }{2}}{\pi }}\right \rfloor \right )}{3 d} & \text{for}\: d \neq 0 \\\frac{x \left (\cos{\left (c \right )} + 3\right )}{2 - \cos{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28236, size = 97, normalized size = 2.06 \begin{align*} -\frac{3 \, d x - 5 \, \sqrt{3}{\left (d x + c + 2 \, \arctan \left (-\frac{\sqrt{3} \sin \left (d x + c\right ) - 3 \, \sin \left (d x + c\right )}{\sqrt{3} \cos \left (d x + c\right ) + \sqrt{3} - 3 \, \cos \left (d x + c\right ) + 3}\right )\right )} + 3 \, c}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]